package day03_oop_code.com.itheima.d4_innerclass4;

public class Test {
    public static void main(String[] args) {
        Animal a1 = new Animal() {
            @Override
            public void cry() {
                System.out.println("Animal.cry");
            }
        };
        a1.cry();

        Dog dog = new Dog();
        dog.cry();
    }
}

class Dog extends Animal{
    @Override
    public void cry() {
        System.out.println("Dog.cry");
    }
}

abstract class Animal{
    public abstract void cry();
}
